<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>媒体查询顺序</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body{
            background-color: red;
        }

        /*
          比较最大值（max-width）时，排序从大到小排
          比较最小值（min-width）时，排序从小到大排
        */

        /* @media screen and (max-width: 1200px){
            body{
                background-color: blue;
            }
        }
        @media screen and (max-width: 992px){
            body{
                background-color: green;
            }
        }
        @media screen and (max-width: 768px){
            body{
                background-color: red;
            }
        } */

        
        @media screen and (min-width: 768px){
            body{
                background-color: green;
            }
        }
        @media screen and (min-width: 992px){
            body{
                background-color: blue;
            }
        }
        @media screen and (min-width: 1200px){
            body{
                background-color: orange;
            }
        }
    </style>
</head>
<body>
    <!-- 需求：
        screen width < 768px red
        screen width 768-992 green
        screen width 992-1200 blue
        screen width >1200 orange
    -->
</body>
</html>